<%@ page language="java" import="java.util.*,com.bean.*,com.Dao.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
  <body>
    
  <div style="background-color:pink;float:left;width:20%;height:700px">
    <form>
        <input style="margin: 50px;width: 50px;height: 30px;" type="button" name="but1" value="初级"><br/>
        <input style="margin: 50px;" type="button" name="but2" value="中级"><br/>
        <input style="margin: 50px;" type="button" name="but3" value="高级"><br/>
        <a href="https://www.baidu.com/"><input style="margin: 50px;" type="button" name="but4" value="退出"></a><br/>
    </form>
</div>

<div style="background-color:green;float:left;width:80%;height:100px">
   学生信息表
</div>
    
    
    <div style="background-color:white;float:left;width:80%;height:600px;align:center;">
     <% 
    //<%中间的部门就是java代码。
	List<Student> listStudent = new ArrayList<Student>();
		 
	listStudent = StudentDao.queryStudentById(0);
    %>

    <table border="1" cellspacing="0" style="margin-top: 100px;margin-left: 300px;text-align: center;">
    <tr>
    <th>学号</th><th>姓名</th><th>班级</th><th>电话</th><th>身份证</th><th>照片</th><th>git账号</th>
    </tr>
    <%
    for (Student student : listStudent) {
    	//		String n1=name;//这一行是为了获取记录集中的一行数据
    			%>
    			<tr>
    			<td><%=student.getId() %></td>
    			<td><%=student.getName() %></td>
    			<td><%=student.getClassid() %></td>
    			<td><%=student.getTelephone() %></td>
    			<td><%=student.getCreditcard() %></td>
    			<td><%=student.getPhotourl() %></td>
    			<td><%=student.getGiturl() %></td>
    			</tr>
    			<%
    		}
    %>
    </table>
   </div> 
    
  </body>
</html>
